<template>
    <div class="function-list-container">
      <ul class="function-list">
        <li class="function-item" @click="goToPage('user-manage')">
          <span class="function-item-icon">
            <van-icon name="manager-o" />
          </span>
          <span class="function-item-text">用户管理</span>
        </li>
        <li class="function-item" @click="goToPage('friend-manage')">
          <span class="function-item-icon">
            <van-icon name="friends-o" />
          </span>
          <span class="function-item-text">好友管理</span>
        </li>
        <li class="function-item" @click="goToPage('job-manage')">
          <span class="function-item-icon">
            <van-icon name="setting-o" />
          </span>
          <span class="function-item-text">任务管理</span>
        </li>
      </ul>
    </div>
  </template>
  
  <script setup>
  import { router } from '@inertiajs/vue3'
  
  const goToPage = (page) => {
    // 这里根据实际路由调整
    if (page === 'user-manage') {
      router.visit('/root/user')
    } else if (page === 'friend-manage') {
      router.visit('/root/friend')
    } else if (page === 'job-manage') {
      router.visit('/root/task')
    }
  }
  </script>
  
  <style scoped>
  .function-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4;
    padding: 20px 0;
  }
  .function-list {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 600px;
  }
  .function-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 20px 30px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
  }
  .function-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }
  .function-item:active {
    background: #f0f6ff;
  }
  .function-item-icon {
    font-size: 28px;
    margin-right: 20px;
    color: #666;
    display: flex;
    align-items: center;
  }
  .function-item-text {
    font-size: 18px;
    color: #333;
    font-weight: 500;
  }
  </style>